using UnityEngine;
using System.Collections;

public class CharacterAnimation_Dialog01 : DrawableGameObject 
{
	public Texture2D[] runningTextures;
	public static bool dialogFinished = false;
	
	GameObject[] BGs;
	
	public string level;
	
	public override void Start () 
	{
		base.SetAnimations(null,runningTextures,null,null);
		base.Start();
		dialogFinished = false;
	}
	
	void Update () 
	{
		BGs = GameObject.FindGameObjectsWithTag("Background");
		if(dialogFinished)
		{
			RunAnimations();
			transform.Translate(0.1f,0,0);
			
			foreach(GameObject bg in BGs)
			{
				bg.GetComponent<Parallax>().SetParallax("Normal");
			}
		}
	}
	
	public void RunAnimations()
	{
		base.gameAnimation.CalculateFps(15);
		base.RunAnimation("Walk", "Loop");
	}
}
